Skip to main content

A targeting rule that serves a specific value to users matching the conditions. Set coverage < 1 for a percentage rollout.

value
string
required

The value to serve when this rule matches.

description
string
enabled
boolean
condition
string
savedGroups
object[]
prerequisites
object[]
allEnvironments
boolean

When true the rule applies to all environments. Defaults to false.

environments
string[]

Specific environment IDs this rule applies to. Used when allEnvironments is false.

type
enum<string>

Use "force" for a standard targeting rule, or "rollout" for a percentage rollout (coverage < 1). Defaults to "force". Both are functionally equivalent; a force rule with coverage < 1 behaves as a rollout.

Available options:
force,
rollout
sparse
boolean

JSON features only. When true, the rule value is a partial object merged onto the feature's default value instead of replacing it.

coverage
number

Percentage of users to include (0–1). Defaults to 1. When less than 1, hashAttribute is required.

Required range: 0 <= x <= 1
hashAttribute
string

Attribute to hash on for consistent assignment. Required when coverage < 1.

seed
string
hashVersion

Hash algorithm version for bucketing. Defaults to 2 (preferred) when not specified.